import Vue from 'vue'

import App from './App.vue'
import store from './store' 
import router from './router' 
import { mapState } from 'vuex'
Vue.config.productionTip = false

new Vue({
  store,
  router,
  render: (h) => h(App),
  computed:mapState('todoMvcModel', ['todoList']),
  watch:{
    todoList:{
      deep:true,
      handler(newValue){
        localStorage.setItem("todoList",JSON.stringify(newValue))
      }
    }
  }
}).$mount('#app')
